import * as THREE from 'three';

// const geometry = new THREE.BoxGeometry(50, 50, 50);
const geometry = new THREE.PlaneGeometry(150, 70);
const material = new THREE.MeshLambertMaterial({
    color: 0xffff00,
    // transparent: true,
    // opacity: 0.5,
})

// 颜色对象
// const color = new THREE.Color();
// color.r = 0
// console.log('color',color);
// material.color = color;



const mesh = new THREE.Mesh(geometry, material);

// 创建了一个三维向量对象Vector3
// const v3 = new THREE.Vector3(100,100,100);
// v3.setX(50);
// console.log('v3的x',v3.x);
// 位置
// mesh.position.set(100,0,0);
// 缩放
// mesh.scale.set(0.5,0.5,0.5)
// mesh.scale.x = 0.5;
// 平移
// mesh.translateX(50);
// const v = new THREE.Vector3(1,1,1);
// console.log('v',v);
// v.normalize()
// console.log('v',v);
// mesh.translateOnAxis(v, 100)

// // 创建一个欧拉对象，
// const eu = new THREE.Euler(Math.PI / 2, Math.PI, 0)
// eu.x = Math.PI;
// console.log('eu.x',eu.x)
// //rotation角度属性
// // mesh.rotation.y = Math.PI / 4;
// //rotate旋转方法
// mesh.rotateY(Math.PI / 4);
// mesh.rotateZ(Math.PI / 4);



export default mesh;